cmake_minimum_required(VERSION 2.6)
project(sfm)

include_directories("/usr/local/include/eigen3")

find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIR})
link_libraries(${OpenCV_LIBRARY_DIR})

find_package(Sophus REQUIRED)
include_directories(${Sophus_INCLUDE_DIRS})

find_package(Ceres REQUIRED)
include_directories(${CERES_INCLUDE_DIRS})
link_libraries(${CERES_LIBRARY_DIRS})

find_package(Pangolin REQUIRED)
include_directories(${Pangolin_INCLUDE_DIRS})

add_executable(sfm main.cpp camera.cpp config.cpp feature.cpp frame.cpp frontend.cpp map  mappoint.cpp viewer.cpp)
target_link_libraries(sfm ${OpenCV_LIBS} ${Sophus_LIBRARIES} ${CERES_LIBRARIES} ${Pangolin_LIBRARIES})

install(TARGETS sfm RUNTIME DESTINATION bin)

